package com.haruhi.ws.server;

import io.undertow.server.HttpServerExchange;
import io.undertow.util.HeaderMap;

import java.io.OutputStream;

public class HttpResponse {
    private final HttpServerExchange exchange;

    public HttpResponse(HttpServerExchange exchange) {

        this.exchange = exchange;
    }

    public void setStatusCode(int statusCode){
        exchange.setStatusCode(statusCode);
    }

    public HeaderMap getResponseHeaders(){
        return exchange.getResponseHeaders();
    }

    public OutputStream getOutputStream(){

        return exchange.getOutputStream();
    }

    public void setResponseContentLength(long length){
        exchange.setResponseContentLength(length);
    }

    public long getResponseContentLength(){
        return exchange.getResponseContentLength();
    }

}
